#ifndef ROWMODEL_H_
#define ROWMODEL_H_

#include <vector>
#include "BlockModel.h"
#include "Color.h"
#include "ModelComposite.h"

class RowModel : public ModelComposite
{
public:
    RowModel(size_t length);
    virtual ~RowModel();
    bool isFull();
    void addBlock(int playerId, const Position& position, const Color& color);
    bool noExistingBlock(const Position& position);
    BlockModels getBlocks();

private:
    void updateScore(int playerId);

    BlockModels blocks;
    size_t width;
};

typedef std::vector<RowModel*> RowModels;

#endif /* ROWMODEL_H_ */
